import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-04-25
 * Time: 11:01
 */
public class Dome_02 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int a = in.nextInt();
            if (a == 1) {
                System.out.println(1);
                continue;
            }
            if (a == 2) {
                System.out.println(2);
                continue;
            }
            int i = 1;
            int j = 2;
            int res = 0;
            for (int k = 2; k < a; k++) {
                res = j + i;
                i = j;
                j = res;
            }
            System.out.println(res);
        }
    }
}
